// Copyright (C) 2022-2022 wuchengwen. All Rights Reserved.
// Description:
// Author : wuchengwen <wuchw@foxmail.com>
// Date :2022-08-28

#include <iostream>
#include <vector>

using namespace std;
// https://en.cppreference.com/w/cpp/language/range-for
int main()
{
    std::vector<int> v = {0, 1, 2, 3, 4, 5};
    for (auto n = v.size(); auto i : v) { // the init-statement (C++20)
        std::cout << --n + i << ' ';
    }
    std::cout << '\n';
    return 0;
}